package com.gitee.sxc25800.Zooooo;

import java.util.Scanner;

/*
    @author: Chen
    @date: 2022/3/15 10:37 AM (UTC+8)
    @version: v1.0
    @description: 动物园
 */

public class Zoo {
    public static void main(String[] args) {
        Animals animals = new Animals();

        while (true) {
            animals.getAnimalsList();
            System.out.println("1. 查询动物\n 2. 修改动物信息\n请输入选项: ");
            Scanner option = new Scanner(System.in);
            switch (option.nextInt()) {
                case 1:
                    System.out.println("请输入要查询的动物种类：");
                    Scanner animal = new Scanner(System.in);
                    animals.getData(animal.nextLine());
                    break;
                case 2:
                    System.out.println("请输入要修改的动物种类：");
                    Scanner animal1 = new Scanner(System.in);
                    String animaType = animal1.nextLine();
                    animals.setAnimalName(animaType);
                    break;
                default:
                    System.out.println("输入错误！");
            }
        }

    }
}
